/*
 * @Author: 卡卡 1071780426@qq.com
 * @Date: 2024-01-17 15:06:26
 * @LastEditors: 贺楠 1071780426@qq.com
 * @LastEditTime: 2024-06-03 16:39:05
 * @FilePath: \zjgxpt\zdgy\src\utils\userNatu.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import actions from "@/actions";
import {
  getUserNature
} from "@/api/request.js";
var userNature;
var loginName;
actions.onGlobalStateChange((state, prev) => {
  loginName = prev.currentUser.loginName;
}, true);

class API {
  userNature() {
    return new Promise((resolve, reject) => {
      try {
        getUserNature({
          username: loginName,
        })
          .then((res) => {
            if (res.errcode == 0) {
              console.log(res.errcode);
              resolve(res)


            }
          })

      } catch (error) {
        console.log(error, '请求失败')
        reject(error)
      }
    })
  }
}
export default new API()